package com.example.minefieldkeepercloud.view;

import android.graphics.Color;

import com.example.minefieldkeepercloud.R;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.data.LineDataSet;

import java.util.List;

/**
 * @Author:Created by  ygy
 * @time:2019/12/30
 */
public class MyLineDataSet extends LineDataSet {
    private List<Entry> yVals;


    public MyLineDataSet(List<Entry> yVals, String label,List<Entry> yValssss) {
        super(yVals, label);

        this.yVals=yValssss;
    }


    @Override
    public int getColor(int index) {
        if (index < (yVals.size() - 1)) {
            if (yVals.get(index + 1).getY() == -1.0f) {
                return R.color.possible_result_points;
            }
        }

        return R.color.system_color;
    }
}
